<template>
    MyRight组件
</template>

<script setup>
    import { onActivated, onDeactivated } from 'vue';
    onActivated(() => {
        console.log('MyLeft组件被激活了')
    })

    onDeactivated(() => {
        console.log('MyLeft组件被缓存了')
    })
</script>